Interrupts ---------- What is an IRQ? --------------- IRQ is an abbreviation for Interrupt Request. What is an Interrupt? There are basically two ways the Central Processing Unit (CPU) of your computer can talk to peripheral devices such as printers and serial ports. 1. Polled - CPU constantly asks about the status. 2. Interrupts - Device interrupts CPU when it needs attention. With polled operation, the CPU is constantly asking all the devices: "Serial port, do you have anything for me?" "Printer port, are you ready for another character?" "Keyboard, was a key pressed?" "Floppy drive, did you find that sector yet? This wastes a lot of time because the answer is usually the same: "I don't have anything for you now, CPU." The alternative is for the device to "interrupt" the CPU when it needs attention. The CPU stops what it is doing, remembers where it was, does something for the I/O device, and goes back to what it was doing. Much like answering the telephone. You don't constantly pick it up to see if anyone is there. When it rings you answer it, transfer some information, and generally go back to what you were doing before it rang. The original IBM PC had the ability to use 8 different interrupts: IRQ Standard Usage --- -------------- 0 Timer 1 Keyboard 2 Video display 3 Serial port 2 4 Serial port 1 5 Printer port 2 6 Floppy disk controller 7 Printer port When the IBM PC/AT was introduced, additional interrupts were made available: IRQ Standard Usage --- -------------- 8 Real-time clock 9 Replaced IRQ 2 10 spare 11 spare 12 spare 13 Numeric Coprocessor 14 Hard disk controller 15 spare Ten of these are available from the expansion slots, others can be used only by devices on the mother board. Clearly the hardware and software configuration must agree. If a serial port generates IRQ 4 but the software thinks IRQ 4 means the printer is ready for another character, the system won't work properly. The design of the old standard ISA bus does not allow two different devices to share the same interrupt. IRQ Selection ------------- Rather than sitting there, contstantly asking whether the audio input line has changed, this program uses interrupts to be notified when an audio zero crossing has occurred. Each serial port is assigned a particular interrupt. As tabluated above, COM1 will normally use IRQ 4 and COM2 will use IRQ 3. When using one of these, in a standard configuration, all you have to do is: - Display the "Setup" menu. - Pick the "SSTV Interface" item. - Choose COM1 or COM2. COM3 and COM4 can be a little more confusing. As shown above, COM3 and COM4 originally used the same interrupts as COM1 and COM2. This meant that the devices sharing an interrupt could not be used at the same time. More modern serial port cards give you a choice of other interrupts. For example, my COM3 uses IRQ 11 and COM4 uses IRQ 12. There is no standard assignment in this case, and every machine will be different. In the case of COM3 and COM4, you will also have to pick the "Interrupt" item from the "Setup" menu and choose the interrupt used by the serial port.